#include <iostream>

using namespace std;

int main()
{
    string s; cin >> s;
    int sum = 1;
    for(auto ch : s)
    {
        if(ch == '-') sum--;
        else sum *= 2;
        if(sum >= 2025)
        {
            cout << "YES" << endl;
            return 0;
        }
    }
    cout << "NO" << endl;
    return 0;
}